/*
 * HedgeMisc.c
 *
 *  Created on: Oct 15, 2020
 *      Author: Administrator
 */

#include	"HedgeMisc.h"
#include	"stdio.h"
#include	"main.h"

extern	UART_HandleTypeDef huart4;


#ifdef __GNUC__

#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)

PUTCHAR_PROTOTYPE
{
    //注意下面第一个参数是&husart1，因为cubemx配置了串口1自动生成的
	HAL_UART_Transmit(&huart4, (uint8_t*)&ch, 1, HAL_MAX_DELAY);
    return ch;
}
#endif

